package com.xmut.mall.order.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmut.mall.order.entity.AfterSaleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xmut.mall.order.searchparam.AfterSaleSearchParams;
import com.xmut.mall.order.to.StoreAfterSaleAddressDTO;
import com.xmut.mall.order.vo.AfterSaleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface AfterSaleDao extends BaseMapper<AfterSaleEntity> {

    /**
     * 获取售后数据的分页信息
     * @param initPage
     * @param params
     * @return
     */
    IPage<AfterSaleVO> getAfterSalePage(Page<Object> initPage,@Param("params") AfterSaleSearchParams params);


    /**
     * 根据售后的sn号码获取售后的详情信息
     * @param sn
     * @return
     */
    AfterSaleVO getAfterSaleDetail(@Param("sn") String sn);

    /**
     * 根据商家id获取 商家售后收件地址
     * @param storeId
     * @return
     */
    StoreAfterSaleAddressDTO getStoreAfterSaleAddressDTO(@Param("storeId") Long storeId);
}
